package io.lkt.modules.sys.service.impl;

import io.lkt.modules.sys.entity.PeriodEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lkt.common.utils.PageUtils;
import io.lkt.common.utils.Query;

import io.lkt.modules.sys.dao.BSysUserWeekScoreDao;
import io.lkt.modules.sys.entity.BSysUserWeekScoreEntity;
import io.lkt.modules.sys.service.BSysUserWeekScoreService;


@Service("bSysUserWeekScoreService")
public class BSysUserWeekScoreServiceImpl extends ServiceImpl<BSysUserWeekScoreDao, BSysUserWeekScoreEntity> implements BSysUserWeekScoreService {
    @Autowired
    private BSysUserWeekScoreDao bSysUserWeekScoreDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BSysUserWeekScoreEntity> page = this.page(
                new Query<BSysUserWeekScoreEntity>().getPage(params),
                new QueryWrapper<BSysUserWeekScoreEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<BSysUserWeekScoreEntity> getList(Map<String, Object> params) {
        return bSysUserWeekScoreDao.getList(params);
    }

    @Override
    public Integer getListTotal(Map<String, Object> params) {
        return bSysUserWeekScoreDao.getListTotal(params);
    }

    @Override
    public Integer getMaxPeriod() {
        return bSysUserWeekScoreDao.getMaxPeriod();
    }

    @Override
    public List<PeriodEntity> getPeriodList() {
        return bSysUserWeekScoreDao.getPeriodList();
    }

}
